package main

import (
	"fmt"
	"time"
)

func createWork(n int) chan int{
	c:= make(chan int)
	go func(){
		for  {
			fmt.Printf("this is %d chane %c \n",n,<-c)
		}
	}()
	return c

}
func channelDemo(){
	var channes [10]chan int
	for i:=0;i<10;i++{
		channes[i]=createWork(i)
	}
	for i:=0;i<10;i++{
		channes[i]<-'a'+i
	}
	for i:=0;i<10;i++{
		channes[i]<-'A'+i
	}
	time.Sleep(time.Second)
}
func main() {
	channelDemo()
}
